package com.mocha.nezha.dmo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mocha.nezha.nezha.PoleVertex;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 杆子
 *
 * @author songkui
 * @since 2024/2/21 17:24
 */
@Data
@EqualsAndHashCode(of = {"id"}, callSuper = false)
@Accessors(chain = true)
@TableName("vt_config.pole")
public class PolePGEntity {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    //杆子编码
    @TableField("pole_code")
    private String poleCode;

    //所属园区
    @TableField("park_code")
    private String parkCode;

    //杆子名称
    @TableField("pole_name")
    private String poleName;

    //备注
    @TableField("remark")
    private String remark;


    //经度
    @TableField("lon")
    private String lon;

    //维度
    @TableField("lat")
    private String lat;
    //高度
    @TableField("height")
    private String height;

    @TableField("point_no")
    private String pointNo;


    public PoleVertex buildVertex() {
        PoleVertex vertex = new PoleVertex();
        vertex.setVertexId(this.id);
        vertex.setParkCode(this.parkCode);

        vertex.setPoleCode(this.getPoleCode());
        vertex.setPoleName(this.getPoleName());
        vertex.setLat(this.getLat());
        vertex.setLon(this.getLon());
        vertex.setHeight(this.getHeight());
        return vertex;
    }

}
